package cn.hc.ai.entity.vo;

import lombok.Data;
import org.springframework.ai.chat.messages.Message;

/**
 * @author : Henry
 * {@code CreateTime}: 2025-05-14 09:31
 * {@code Version}: 1.0
 */
@Data
public class MessageVO {

    private String role;
    private String content;

    public MessageVO(Message message) {
        switch (message.getMessageType()) {
            case USER -> role = "user";
            case ASSISTANT -> role = "assistant";
        }
        this.content = message.getText();
    }
}
